@import "./_themes.scss";
// 遍历主题
@mixin themeify {
  @each $theme-name, $theme-map in $themes {
    // !global 把局部变量强升为全局变量
    $theme-map: $theme-map !global;
    [lz-theme="#{$theme-name}"] & {
        @content;
    }
  }
}

// 声明一个根据Key获取颜色的function
@function themed($key) {
    @return map-get($theme-map, $key);
}

// 获取字体颜色
@mixin font_color($color) {
    @include themeify{
        color: themed($color)!important;
    }
}

// 获取边框颜色
@mixin border_color($color) {
    @include themeify{
        border-color: themed($color)!important;
    }
}

// 获取背景颜色
@mixin background_color($color) {
    @include themeify{
        background-color: themed($color)!important;
    }
}

// 鼠标划过
@mixin background_hover_color($color) {
    @include themeify{
        background-color: themed($color)!important;
    }
}

// 禁用
@mixin background_disable_color($color) {
    @include themeify{
        background-color: themed($color)!important;
    }
}
//伪类
@mixin border-bottom-color($color) {
    @include themeify{
        border-bottom-color: themed($color)!important;
    }
}